package com.dragon.pear.modules.trade.web.model.params.order;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * @author Chris Chan
 * Create on 2025-09-30 22:06
 * Use for: 商品分类 数据排序请求参数
 * Explain:
 * 所有字段取值规则：-1 降序，0 不排序，1 升序
 */
@Schema(description = "商品分类 排序参数")
public class TradeGoodsCategoryOrderParam {
    @Schema(description = "ID", example = "1")
    private int id;
    @Schema(description = "分类编码", example = "1")
    private int code;
    @Schema(description = "父级分类编码", example = "1")
    private int parentCode;
    @Schema(description = "分类层级", example = "1")
    private int level;
    @Schema(description = "分类名称", example = "1")
    private int name;
    @Schema(description = "分类图标", example = "1")
    private int icon;
    @Schema(description = "分类图片", example = "1")
    private int img;

    // 无参构造方法
    public TradeGoodsCategoryOrderParam() {
    }

    // 全参数构造方法
    public TradeGoodsCategoryOrderParam(int id, int code, int parentCode, int level, int name, int icon, int img) {
        this.id = id;
        this.code = code;
        this.parentCode = parentCode;
        this.level = level;
        this.name = name;
        this.icon = icon;
        this.img = img;
    }

    // 全参数create生成器
    public static TradeGoodsCategoryOrderParam create(int id, int code, int parentCode, int level, int name, int icon, int img) {
        return new TradeGoodsCategoryOrderParam(id, code, parentCode, level, name, icon, img);
    }

    // 全参数of生成器
    public static TradeGoodsCategoryOrderParam of(int id, int code, int parentCode, int level, int name, int icon, int img) {
        return new TradeGoodsCategoryOrderParam(id, code, parentCode, level, name, icon, img);
    }
    // region Getter和Setter方法
    public int getId() {
        return id;
    }

    public TradeGoodsCategoryOrderParam setId(int id) {
        this.id = id;
        return this;
    }

    public int getCode() {
        return code;
    }

    public TradeGoodsCategoryOrderParam setCode(int code) {
        this.code = code;
        return this;
    }

    public int getParentCode() {
        return parentCode;
    }

    public TradeGoodsCategoryOrderParam setParentCode(int parentCode) {
        this.parentCode = parentCode;
        return this;
    }

    public int getLevel() {
        return level;
    }

    public TradeGoodsCategoryOrderParam setLevel(int level) {
        this.level = level;
        return this;
    }

    public int getName() {
        return name;
    }

    public TradeGoodsCategoryOrderParam setName(int name) {
        this.name = name;
        return this;
    }

    public int getIcon() {
        return icon;
    }

    public TradeGoodsCategoryOrderParam setIcon(int icon) {
        this.icon = icon;
        return this;
    }

    public int getImg() {
        return img;
    }

    public TradeGoodsCategoryOrderParam setImg(int img) {
        this.img = img;
        return this;
    }

    // endregion Getter和Setter方法
}
